package com.hjb.service.impl;

import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hjb.entity.User;
import com.hjb.mapper.UserInfoMapper;
import com.hjb.service.UserLogService;
import com.hjb.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @author HuJiaBing
 * @date 2025/8/6 16:59
 * @description
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserInfoMapper, User> implements UserService {
    @Resource
    private UserLogService userLogService;
    @Override
    @DSTransactional
    public void saveUser() {
        User user = new User();
        user.setName("admin");
        this.save(user);
        userLogService.saveLog();
    }
}
